var mongoose = require('mongoose')

var Schema = mongoose.Schema

mongoose.connect('mongodb://localhost/test')

var todoSchema = new Schema({
  done: {
    type: Boolean,
    required: true
  },
  text: {
    type: String,
    required: true
  }
})

var Todo = mongoose.model('Todo', todoSchema)


module.exports = Todo
